#define   _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int Spin_CHAR(char* arr1, char* arr2)
{
	int len1 = strlen(arr1);
	int len2 = strlen(arr2);
	if (len1 != len2)
	{
		return 0;
	}
	char tmp[256] = { 0 };
	strcpy(tmp, arr1);
	strcat(tmp, arr1);
	return strstr(tmp, arr2) != NULL;
}
int main()
{
	char arr1[] = "AABCD";
	char arr2[] = "BCDAA";
	printf("%d\n", Spin_CHAR(arr1, arr2));

	char arr3[] = "abcd";
	char arr4[] = "ACBD";
	printf("%d\n", Spin_CHAR(arr3, arr4));

	return 0;
}